#pragma once
#include "CVSView.h"
#include "CSingleton.h"
namespace Framework
{
	enum GameStatus{
		INIT=0,
		RUNNING,
		PAUSED,
		EXIT
	};
	class CGame:public CAbsSingleton<CGame>
	{
		friend class CAbsSingleton<CGame>;
	public:
		virtual ~CGame(){}
		virtual void Update();
		virtual void Pause();
		virtual void Resume();
		virtual void Exit();
		bool IsAlive(){return (m_eStatus!=EXIT);}
		bool IsPause(){return (m_eStatus==PAUSED);}
	protected:	
		CGame();
		virtual void Init()=0;
		virtual void Destroy()=0;
	private:
		bool m_isAlived;
		bool m_isPaused;
		enum GameStatus m_eStatus;
	};


}
